


#include <iostream>
#include <string>
#include <vector>
#include <list>
using namespace std;

class Solution 
{
public:
    string formatString(string str, vector<char>& arg)
    {
        string res;

        int n1 = str.size(), n2 = arg.size();
        int i = 0, j = 0;
        while (i < n1)
        {
            if (str[i] != '%')
            {
                res += str[i++];
            }
            else
            {
                res += arg[j++];
                i += 2;
            }
        }

        if (j < n2)
        {
            while (j < n2)
            {
                res += arg[j++];
            }
        }

        return res;
    }
};

bool isprime(int num)
{
    for (int i = 2; i < num / 2; ++i)
    {
        if (0 == num % i)
            return false;
    }

    return true;
}

bool check(int no)
{
    if (no < 10)
        return false;

    string s = to_string(no);
    for (int i = 0, n = s.size(); i < n - 1; ++i)
    {
        for (int j = i + 1; j < n; ++j)
        {
            string tmp;
            int num1 = 0, num2 = 0;

            tmp += s[i];
            tmp += s[j];
            num1 = stoi(tmp);

            swap(tmp[0], tmp[1]);
            num2 = stoi(tmp);

            if ((num1 > 9 && isprime(num1)) || (num2 > 9 && isprime(num2)))
                return true;
        }
    }

    return false;
}

void Test1()
{
    int a = 0, b = 0;
    cin >> a >> b;

    int res = 0;
    for (int i = a; i <= b; ++i)
    {
        if (check(i))
            ++res;
    }

    cout << res << endl;
}

void Test2()
{
    string s;
    int n = 0;
    cin >> s >> n;

    int sz = s.size();
    if (sz < n)
    {
        cout << "" << endl;
        return;
    }

    string res;
    int prev = 0;

    for (int i = 0, cnt = 0; i <= sz - n; ++i)
    {
        cnt = 0;

        string tmp = s.substr(i, n);
        for (const auto& e : tmp)
        {
            if ('C' == e || 'G' == e)
                ++cnt;
        }

        if (cnt > prev)
        {
            res = tmp;
            prev = cnt;
        }
    }

    cout << res << endl;
}

int main()
{

    return 0;
}